package cn.petplatform.petback.service.user;

import cn.petplatform.dto.ResponseDto;
import cn.petplatform.petback.pojo.User;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import javax.servlet.http.HttpServletRequest;

/**
 * @author LNL
 * @date 2021/5/13 15:51
 */
public interface UserService {

    /**
     * 按照用户名和密码登录
     * @param username
     * @param password
     * @return
     */
    ResponseDto login(String username, String password);

    /**
     * 用户注册
     * @param request
     * @return
     */
    ResponseDto register(MultipartHttpServletRequest request);

    /**
     * 修改用户信息
     * @param user
     * @param request
     * @return
     */
    ResponseDto updateInfo(User user, HttpServletRequest request);

    /**
     * 删除用户
     * @param id
     * @param request
     * @return
     */
    ResponseDto deleteUser(String id, HttpServletRequest request);

    /**
     * 获取个人信息
     * @param id
     * @param request
     * @return
     */
    ResponseDto getUserInfo(String id, HttpServletRequest request);

    ResponseDto loginAdmin(String username, String password);
}
